<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="./lib/layui/css/layui.css" />
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script th:inline="none">
        layui.use(["layer", "table"], function () {
                var layer = layui.layer;
                var table = layui.table;
                var cid=$("#cid");
                console.log(cid.val());
                table.render({
                    elem: "#student",
                    url: "getstulistbycid?cid=" +cid.val(),
<!--                    data:{"cid":cid.val()},-->
                    page: true,
                    toolbar: '#toolbarDemo',
                    limit: 5,
                    cols: [[ //表头
                        {field: 'id', title: '编号', width:150, sort: true, fixed: 'left'}
                    ,{field: 'name', title: '姓名', width:250}

                    ]]
                })



            })
    </script>


</head>
<body>
<input type="hidden" id="cid" th:value="${cid}">
<table id="student" lay-filter="classestab"></table>
</body>
</html>